Mapbox macOS SDK Docs macOS SDK Reference

View on GitHub

Install in Dash

Mapbox macOS SDK Reference Content Primitives Reference
  • Guides
    • Working with GeoJSON Data
    • For Style Authors
    • Using Style Functions at Runtime
    • Tile URL Templates
    • Info.plist Keys
  • Maps
    • MGLAccountManager
    • MGLMapCamera
    • MGLMapView
    • MGLMapViewDelegate
  • Shapes and Annotations
    • MGLAnnotation
    • MGLAnnotationImage
    • MGLOverlay
    • MGLShape
    • MGLMultiPoint
    • MGLPointAnnotation
    • MGLPointCollection
    • MGLPolygon
    • MGLPolyline
    • MGLMultiPolygon
    • MGLMultiPolyline
    • MGLShapeCollection
  • Styling the Map
    • MGLStyle
    • MGLStyleValue
    • MGLLight
  • Content Primitives
    • MGLFeature
    • MGLPointFeature
    • MGLPolygonFeature
    • MGLPolylineFeature
    • MGLMultiPolygonFeature
    • MGLMultiPolylineFeature
    • MGLPointCollectionFeature
    • MGLShapeCollectionFeature
  • Content Sources
    • MGLSource
    • MGLTileSource
    • MGLShapeSource
    • MGLRasterSource
    • MGLVectorSource
  • Style Layers
    • MGLStyleLayer
    • MGLForegroundStyleLayer
    • MGLBackgroundStyleLayer
    • MGLRasterStyleLayer
    • MGLVectorStyleLayer
    • MGLCircleStyleLayer
    • MGLFillStyleLayer
    • MGLFillExtrusionStyleLayer
    • MGLLineStyleLayer
    • MGLSymbolStyleLayer
  • Offline Maps
    • MGLOfflineRegion
    • MGLOfflineStorage
    • MGLOfflinePack
    • MGLOfflinePackProgress
    • MGLOfflinePackState
    • MGLTilePyramidOfflineRegion
  • Geometry
    • MGLCoordinateBounds
    • MGLCoordinateBoundsEqualToCoordinateBounds
    • MGLCoordinateBoundsGetCoordinateSpan
    • MGLCoordinateBoundsIntersectsCoordinateBounds
    • MGLCoordinateBoundsIsEmpty
    • MGLCoordinateBoundsMake
    • MGLCoordinateBoundsOffset
    • MGLCoordinateInCoordinateBounds
    • MGLCoordinateSpan
    • MGLCoordinateSpanEqualToCoordinateSpan
    • MGLCoordinateSpanMake
    • MGLCoordinateSpanZero
    • MGLDegreesFromRadians
    • MGLRadiansFromDegrees
    • MGLStringFromCoordinateBounds
  • Formatters
    • MGLClockDirectionFormatter
    • MGLCompassDirectionFormatter
    • MGLCoordinateFormatter
    • MGLDistanceFormatter
  • Other Categories
    • NSValue(MGLAdditions)
    • NSValue(MGLCircleStyleLayerAdditions)
    • NSValue(MGLFillExtrusionStyleLayerAdditions)
    • NSValue(MGLFillStyleLayerAdditions)
    • NSValue(MGLLineStyleLayerAdditions)
    • NSValue(MGLSymbolStyleLayerAdditions)
  • Other Classes
    • MGLAttributionInfo
    • MGLCameraStyleFunction
    • MGLCompositeStyleFunction
    • MGLConstantStyleValue
    • MGLSourceStyleFunction
    • MGLStyleFunction
  • Other Constants
    • MGLErrorDomain
    • MGLOfflinePackErrorNotification
    • MGLOfflinePackMaximumMapboxTilesReachedNotification
    • MGLOfflinePackProgressChangedNotification
    • MGLOfflinePackUserInfoKeyError
    • MGLOfflinePackUserInfoKeyMaximumCount
    • MGLOfflinePackUserInfoKeyProgress
    • MGLOfflinePackUserInfoKeyState
    • MGLShapeSourceOptionBuffer
    • MGLShapeSourceOptionClusterRadius
    • MGLShapeSourceOptionClustered
    • MGLShapeSourceOptionMaximumZoomLevel
    • MGLShapeSourceOptionMaximumZoomLevelForClustering
    • MGLShapeSourceOptionSimplificationTolerance
    • MGLStyleDefaultVersion
    • MGLStyleFunctionOptionDefaultValue
    • MGLStyleFunctionOptionInterpolationBase
    • MGLTileSourceOptionAttributionHTMLString
    • MGLTileSourceOptionAttributionInfos
    • MGLTileSourceOptionMaximumZoomLevel
    • MGLTileSourceOptionMinimumZoomLevel
    • MGLTileSourceOptionTileCoordinateSystem
    • MGLTileSourceOptionTileSize
    • MapboxVersionNumber
    • MapboxVersionString
  • Other Enums
    • MGLCircleScaleAlignment
    • MGLCircleTranslationAnchor
    • MGLErrorCode
    • MGLFillExtrusionTranslationAnchor
    • MGLFillTranslationAnchor
    • MGLIconRotationAlignment
    • MGLIconTextFit
    • MGLIconTranslationAnchor
    • MGLInterpolationMode
    • MGLLightAnchor
    • MGLLineCap
    • MGLLineJoin
    • MGLLineTranslationAnchor
    • MGLMapDebugMaskOptions
    • MGLResourceKind
    • MGLSymbolPlacement
    • MGLTextAnchor
    • MGLTextJustification
    • MGLTextPitchAlignment
    • MGLTextRotationAlignment
    • MGLTextTransform
    • MGLTextTranslationAnchor
    • MGLTileCoordinateSystem
  • Other Protocols
    • MGLOfflineStorageDelegate
  • Other Type Definitions
    • MGLOfflinePackAdditionCompletionHandler
    • MGLOfflinePackRemovalCompletionHandler
    • MGLOfflinePackUserInfoKey
    • MGLShapeSourceOption
    • MGLStyleFunctionOption
    • MGLTileSourceOption
  • Other Functions
    • MGLSphericalPositionMake
    • MGLTransitionMake
  • Other Structs
    • MGLSphericalPosition
    • MGLTransition

Content Primitives

  • MGLFeature

    The MGLFeature protocol is used to provide details about geographic features contained in an MGLShapeSource or MGLVectorSource object. Each concrete subclass of MGLShape in turn has a subclass that conforms to this protocol. A feature object associates a shape with an optional identifier and attributes.

    You can add custom data to display on the map by creating feature objects and adding them to an MGLShapeSource using the -[MGLShapeSource initWithIdentifier:shape:options:] method or MGLShapeSource.shape property. Similarly, you can add MGLPointFeature, MGLPolylineFeature, and MGLPolygonFeature objects to the map as annotations using -[MGLMapView addAnnotations:] and related methods.

    In addition to adding data to the map, you can also extract data from the map: -[MGLMapView visibleFeaturesAtPoint:] and related methods return feature objects that correspond to features in the source. This enables you to inspect the properties of features in vector tiles loaded by MGLVectorSource objects. You also reuse these feature objects as overlay annotations.

    See more

    Declaration

    Objective-C

    @protocol MGLFeature <MGLAnnotation>

    Swift

    protocol MGLFeature : MGLAnnotation
    View Source on GitHub
  • MGLPointFeature

    An MGLPointFeature object associates a point shape with an optional identifier and attributes.

    Declaration

    Objective-C

    
    @interface MGLPointFeature : MGLPointAnnotation <MGLFeature>

    Swift

    class MGLPointFeature : MGLPointAnnotation, MGLFeature
    View Source on GitHub
  • MGLPolygonFeature

    An MGLPolygonFeature object associates a polygon shape with an optional identifier and attributes.

    Declaration

    Objective-C

    
    @interface MGLPolygonFeature : MGLPolygon <MGLFeature>

    Swift

    class MGLPolygonFeature : MGLPolygon, MGLFeature
    View Source on GitHub
  • MGLPolylineFeature

    An MGLPolylineFeature object associates a polyline shape with an optional identifier and attributes.

    A polyline feature is known as a LineString feature in GeoJSON.

    Declaration

    Objective-C

    
    @interface MGLPolylineFeature : MGLPolyline <MGLFeature>

    Swift

    class MGLPolylineFeature : MGLPolyline, MGLFeature
    View Source on GitHub
  • MGLMultiPolygonFeature

    An MGLMultiPolygonFeature object associates a multipolygon shape with an optional identifier and attributes.

    Declaration

    Objective-C

    
    @interface MGLMultiPolygonFeature : MGLMultiPolygon <MGLFeature>

    Swift

    class MGLMultiPolygonFeature : MGLMultiPolygon, MGLFeature
    View Source on GitHub
  • MGLMultiPolylineFeature

    An MGLMultiPolylineFeature object associates a multipolyline shape with an optional identifier and attributes.

    A multipolyline feature is known as a MultiLineString feature in GeoJSON.

    Declaration

    Objective-C

    
    @interface MGLMultiPolylineFeature : MGLMultiPolyline <MGLFeature>

    Swift

    class MGLMultiPolylineFeature : MGLMultiPolyline, MGLFeature
    View Source on GitHub
  • MGLPointCollectionFeature

    An MGLPointCollectionFeature object associates a point collection with an optional identifier and attributes.

    A point collection feature is known as a MultiPoint feature in GeoJSON.

    Declaration

    Objective-C

    
    @interface MGLPointCollectionFeature : MGLPointCollection <MGLFeature>

    Swift

    class MGLPointCollectionFeature : MGLPointCollection, MGLFeature
    View Source on GitHub
  • MGLShapeCollectionFeature

    An MGLShapeCollectionFeature object associates a shape collection with an optional identifier and attributes.

    MGLShapeCollectionFeature is most commonly used to add multiple shapes to a single MGLShapeSource. Configure the appearance of an MGLSource’s shape collection collectively using an MGLSymbolStyleLayer object, or use multiple instances of MGLCircleStyleLayer, MGLFillStyleLayer, and MGLLineStyleLayer to configure the appearance of each kind of shape inside the collection.

    A shape collection feature is known as a feature collection in GeoJSON.

    Declaration

    Objective-C

    
    @interface MGLShapeCollectionFeature : MGLShapeCollection <MGLFeature>

    Swift

    class MGLShapeCollectionFeature : MGLShapeCollection, MGLFeature
    View Source on GitHub

© 2014–2017 Mapbox. See license for more details.

Generated by jazzy ♪♫ v0.8.2, a Realm project.